<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>属性选择器</title>
    <style>
        [class~=hello] {
            color: blueviolet;
        }
    </style>
</head>

<body>
    <div class="test test1 test3">属性选择器1</div>
    <div class="test2">属性选择器2</div>
    <div class="hello">属性选择器3</div>
</body>

</html>